package org.osiris.client.recursos;

import com.google.gwt.user.client.ui.PopupPanel;
import com.extjs.gxt.ui.client.widget.VerticalPanel;
import com.extjs.gxt.ui.client.widget.HorizontalPanel;
import com.extjs.gxt.ui.client.widget.form.LabelField;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.form.ComboBox;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.widget.form.FileUploadField;
import com.extjs.gxt.ui.client.widget.form.TextArea;
import com.extjs.gxt.ui.client.widget.button.Button;

public class AltaRecurso extends PopupPanel {

	public AltaRecurso() {
		super(true);
		
		VerticalPanel verticalPanel = new VerticalPanel();
		verticalPanel.setSpacing(5);
		
		HorizontalPanel horizontalPanel = new HorizontalPanel();
		horizontalPanel.setSpacing(3);
		
		LabelField lblfldNombre = new LabelField("Nombre");
		horizontalPanel.add(lblfldNombre);
		
		TextField textField = new TextField();
		horizontalPanel.add(textField);
		textField.setFieldLabel("New TextField");
		
		LabelField lblfldReferencia = new LabelField("Referencia");
		horizontalPanel.add(lblfldReferencia);
		
		TextField textField_1 = new TextField();
		horizontalPanel.add(textField_1);
		textField_1.setWidth("100");
		textField_1.setFieldLabel("New TextField");
		
		LabelField lblfldTipo = new LabelField("Tipo");
		horizontalPanel.add(lblfldTipo);
		
		ComboBox comboBox = new ComboBox();
		comboBox.setStore(new ListStore());
		horizontalPanel.add(comboBox);
		comboBox.setFieldLabel("New ComboBox");
		verticalPanel.add(horizontalPanel);
		horizontalPanel.setWidth("600");
		
		HorizontalPanel horizontalPanel_1 = new HorizontalPanel();
		horizontalPanel_1.setSpacing(3);
		
		LabelField lblfldUsuarioAlta = new LabelField("Usuario alta");
		horizontalPanel_1.add(lblfldUsuarioAlta);
		
		TextField textField_2 = new TextField();
		horizontalPanel_1.add(textField_2);
		textField_2.setFieldLabel("New TextField");
		
		LabelField lblfldFechaAlta = new LabelField("Fecha alta");
		horizontalPanel_1.add(lblfldFechaAlta);
		
		TextField textField_3 = new TextField();
		horizontalPanel_1.add(textField_3);
		textField_3.setFieldLabel("New TextField");
		verticalPanel.add(horizontalPanel_1);
		
		LabelField lblfldDescripcion = new LabelField("Descripcion");
		verticalPanel.add(lblfldDescripcion);
		
		TextArea textArea = new TextArea();
		verticalPanel.add(textArea);
		textArea.setWidth("500");
		textArea.setFieldLabel("New TextArea");
		
		FileUploadField fileUploadField = new FileUploadField();
		verticalPanel.add(fileUploadField);
		fileUploadField.setWidth("500");
		fileUploadField.setFieldLabel("New FileUploadField");
		
		HorizontalPanel horizontalPanel_2 = new HorizontalPanel();
		horizontalPanel_2.setSpacing(5);
		
		Button btnGuardar = new Button("Guardar");
		horizontalPanel_2.add(btnGuardar);
		
		Button btnCancelar = new Button("Cancelar");
		horizontalPanel_2.add(btnCancelar);
		
		Button btnModificar = new Button("Modificar");
		horizontalPanel_2.add(btnModificar);
		verticalPanel.add(horizontalPanel_2);
		setWidget(verticalPanel);
		verticalPanel.setSize("600px", "240px");
	}

}
